<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var name = prompt('Please Enter Your Name', 'John');
        console.log('name is ' + name);
    </script>

    <script>
        var a, b, c;
        a = parseInt(prompt("Enter number 1:"));
        b = parseInt(prompt("Enter number 2:"));
        c = a + b;
        document.write('a = ' + a + ', b = ' + b + ', c = ' + c);
    </script>
</body>

</html>

<!-- window.prompt -->
<!-- https://developer.mozilla.org/zh-CN/docs/Web/API/Window/prompt -->